package cn.tedu.lainxi;

import org.junit.Test;

import java.util.Arrays;

public class TestStudent {
    @Test
    public void getStu(){
        Student s1 = new Student("张三",'男',2);
        Student s2 = new Student("李四",'女',3);
        Student s3 = new Student("王五",'男',4);
        Student s4 = new Student("赵六",'女',5);
        Student[]a=new Student[4];
        a[0]=s1;
        a[1]=s2;
        a[2]=s3;
        a[3]=s4;
        System.out.println(Arrays.toString(a));
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i].getName());
            System.out.println(a[i].getAge());
            System.out.println(a[i].getGender());
        }

    }
}
